package se.webbzon.oschi01.nbt;

import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;

import se.webbzon.oschi01.singleton.Singleton;
import se.webbzon.oschi01.utils.Reader;

public class NBTURLReader extends AbstractNBTReader implements Singleton, Reader<Tag<?>,URL> {

	@Override public Tag<?> read(URL source) throws IOException {
		InputStream is = source.openStream();
		Tag<?> tag = read(new DataInputStream(is));
		is.close();
		return tag;
	}
	
}
